home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung CD 2 (Tewi)(1994).iso / doc / ems / disk3 / emm28_i.asm < prev    next >
Assembly Source File  |  1989-11-29  |  3KB  |  73 lines

  1. ;-----------------------------------------------------------------------------;
  2. ;      MODULE NAME:   EMM28_I.ASM                                             ;
  3. ;                                                                             ;
  4. ; OS FUNCTION NAME:   dealloc_DMA_reg_set                                     ;
  5. ;                                                                             ;
  6. ;      DESCRIPTION:   This function deallocates the specified DMA register    ;
  7. ;                     set.                                                    ;
  8. ;                                                                             ;
  9. ;           PASSED:   DMA_reg_set:                                            ;
  10. ;                        is the DMA register set which should not be used for ;
  11. ;                        DMA operations any longer.  The DMA register set     ;
  12. ;                        would have been previously allocated and enabled for ;
  13. ;                        DMA operations on a specific DMA channel.  If the    ;
  14. ;                        DMA register set specified is zero, no action will   ;
  15. ;                        be taken.                                            ;
  16. ;                                                                             ;
  17. ;         RETURNED:   status:                                                 ;
  18. ;                        is the status EMM returns from the call.  All other  ;
  19. ;                        returned results are valid only if the status        ;
  20. ;                        returned is zero.  Otherwise they are undefined.     ;
  21. ;                                                                             ;
  22. ; C USE CONVENTION:   unsigned int status;                                    ;
  23. ;                     unsigned int DMA_reg_set;                               ;
  24. ;                                                                             ;
  25. ;                     status = dealloc_DMA_reg_set (DMA_reg_set);             ;
  26. ;-----------------------------------------------------------------------------;
  27. .XLIST
  28. PAGE    60,132
  29.  
  30. IFDEF SMALL
  31.    .MODEL SMALL, C
  32. ENDIF
  33. IFDEF MEDIUM
  34.    .MODEL MEDIUM, C
  35. ENDIF
  36. IFDEF LARGE
  37.    .MODEL LARGE, C
  38. ENDIF
  39. IFDEF COMPACT
  40.    .MODEL COMPACT, C
  41. ENDIF
  42. IFDEF HUGE
  43.    .MODEL HUGE, C
  44. ENDIF
  45.  
  46. INCLUDE emmlib.equ
  47. INCLUDE emmlib.str
  48. INCLUDE emmlib.mac
  49. .LIST
  50. .CODE
  51.  
  52. dealloc_DMA_reg_set    PROC                                                  \
  53.             DMA_reg_set:WORD
  54.  
  55.     ;---------------------------------------------------------------------;
  56.     ;   do;                                                               ;
  57.     ;   .   return the DMA register set previously allocated to the OS    ;
  58.     ;   .   back to EMM;                                                  ;
  59.     ;---------------------------------------------------------------------;
  60.     MOVE        AX, deallocate_dma_reg_set_fcn
  61.     MOVE        BX, DMA_reg_set
  62.     INT         EMM_int
  63.  
  64.     ;---------------------------------------------------------------------;
  65.     ;   .   return (EMM status);                                          ;
  66.     ;   end;                                                              ;
  67.     ;---------------------------------------------------------------------;
  68.     RET_EMM_STAT    AH
  69.  
  70. dealloc_DMA_reg_set        ENDP
  71.  
  72. END
  73.